package com.ht.medicaltreatment.view

import android.content.Context
import com.blankj.utilcode.util.ActivityUtils
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.activity.InventoryOrderListActivity
import com.ht.medicaltreatment.constant.DevicesSDK
import kotlinx.android.synthetic.main.dialog_devices_layout.btnOk
import kotlinx.android.synthetic.main.dialog_devices_layout.rbPDA

class DevicesCheckedDailog(context: Context) :BaseDialog(context) {
    override fun getLayoutRes() = R.layout.dialog_devices_layout

    init {
        btnOk.setOnClickListener {
            if(rbPDA.isChecked){
                DevicesSDK.devices = DevicesSDK.PDA
            }else{
                DevicesSDK.devices = DevicesSDK.HAND
            }
            dismiss()
            ActivityUtils.startActivity(InventoryOrderListActivity::class.java)
        }
    }
}